<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-signInfo-add">
        <div class="form-group">
            <label class="col-sm-3 control-label">姓名：</label>
            <div class="col-sm-8">
                <!--<input id="empComp" name="empComp" class="form-control" type="text">-->
                <select id="empNm" name="empNm" class="form-control m-b" th:with="type=${@baseInfoServiceImpl.getAllUserName()}">
                    <option th:each="dict : ${type}" th:text="${dict}" th:value="${dict}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">公司：</label>
            <div class="col-sm-8">
                <input type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">项目：</label>
            <div class="col-sm-8">
                <select id="proName" name="proName" class="form-control m-b" th:with="type=${@ProInfoServiceImpl.getAllProList()}">
                    <option th:each="dict : ${type}" th:text="${dict}" th:value="${dict}"></option>
                </select>
            </div>
        </div>
        <button type="submit" onclick="submitSignHandler()" class="btn btn-primary btn-rounded btn-sm center-block">签到</button>
        <button type="submit" onclick="submitSignOutHandler()" class="btn btn-primary btn-rounded btn-sm center-block">签退</button>
    </form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
    var prefix = ctx + "pm/signInfo"

    function submitSignHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/manualSign", $('#form-signInfo-add').serialize());
        }
    }

    function submitSignOutHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/manualSignOut", $('#form-signInfo-add').serialize());
        }
    }
</script>
</body>
</html>
